Field of the Invention
The present invention is something that relates to a technique for encoding of an image.
Description of the Related Art
Currently, methods of encoding have been proposed for encoding image data at high efficiency. JPEG (Joint Photographic Coding Experts Group) is a representative encoding scheme among these. In the JPEG scheme, a DCT (Discrete Cosine Transform) is used in a frequency transformation. However, it is known that block distortion occurs easily for low bit rates because the DCT in JPEG is processed in fixed block units of 8×8 pixels.
Meanwhile, in an encoding scheme called JPEG 2000 which was standardized as a successor of JPEG, a DWT (Discrete Wavelet Transform) is used in a frequency transformation. A DWT divides image data into a plurality of frequency band components by filters called a filter bank that combines a high-pass filter and a low-pass filter. Whereas a DCT performs a frequency transformation in fixed block units, a DWT is not substantially limited to that size, and can perform a frequency transformation in units of a screen, for example, and so a block distortion accompanying a quantization does not occur. After dividing image data into a plurality of frequency bands (hereinafter, referred to as sub-bands), encoding is performed after quantizing for each sub-band. In quantization, a method that reduces the code amount without impairing subjective image quality by assigning a greater code amount for low frequency sub-bands considering a characteristic of visual perception of humans is the general thinking for quantization in still images and video.
Here, a DWT and a quantization in JPEG 2000 can be applied to any rectangular block (referred to hereinafter as a tile). By a technique of dividing into such tiles and then encoding, it is possible to increase a concurrency level of processing, and reduce the capacity of the RAM (a line buffer) held internally. For example, a case of dividing image data into two—left and right—is examined. In such a case, the number of pixels of one horizontal line of the respective left and right tiles is half that of the original, and so it is possible to reduce the capacity of the line buffer held when encoding to half of the original case. However, because independent quantization is executed for each tile, there is the problem that a difference occurs in quantization errors of the respective tiles, and a distortion occurs at a tile boundary portion particularly at a time of high compression.
As prior art, in Japanese Patent Laid-Open No. 2013-175870, a method for reducing a distortion in an image quality that occurs due to discarding of a lower order bit for code amount control in an image encoding scheme in which DWT-based tile division is performed (hereinafter referred to as D1) is disclosed.
A distortion of a tile boundary does not occur if it is possible for each tile to use a shared quantization parameter. However, cases may arise in which when each tile is made to apply the same quantization parameter, controllability of the code amount conversely worsens, and a convergence to a target bit rate does not occur.
In the foregoing D1, a method for reducing boundary distortion that occurs due to lower order bit discard positions differing between tiles in code amount control using bit plane quantization according to an embedded encoding (EBCOT) is recited. In detail, a mechanism is such that error data to be discarded is encoded separately to tile data and held, and by decoding tile data using the held error data at a time of decoding, boundary distortion is reduced. However, in this method, since an error data encoding processing unit, an error data decoding processing unit, and a tile data and error data combining unit for a time of decoding are additionally necessary, there is the concern that complexity and implementation scale will increase.